package com.linwen.javase.desgin_pattern.create.clone.copy;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @ClassName Staff
 * @Description
 * @Author lin
 * @Date 2022/3/13 下午8:07
 * @Version V1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Staff implements Cloneable, Serializable {
    private static final long serialVersionUID = 263159051561322L;

    private String name;
    private String gender;
    private int age;

    @Override
    public Object clone() {
        Staff staff = null;
        try {
            staff = (Staff)super.clone();
        }catch (Exception e){
            e.printStackTrace();
        }
        return staff;
    }
}
